#################################################################
# This docker image build file creates an image that contains
# base golang env.
#
#                    ##        .
#              ## ## ##       ==
#           ## ## ## ##      ===
#       /""""""""""""""""\___/ ===
#  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~
#       \______ o          __/
#         \    \        __/
#          \____\______/
#
# Component:    RNTD
# Author:       Dou Chunrong <douchunrong@gmail.com>
# Copyright:    (c) 2015-2016 RNTD Ltd. All rights reserved.
#################################################################
#Version 0.0.1
FROM ubuntu:15.10

ENV GOVERSION 1.5.2
ENV GOOS linux
ENV GOARCH amd64
ENV GOPATH /gopath
ENV GOROOT /go
ENV GOBIN /go/bin
ENV PATH $PATH:/$GOBIN

RUN apt-get update && apt-get upgrade -y && apt-get install -y gcc nano wget imagemagick libmagickcore-dev git

RUN wget -c https://storage.googleapis.com/golang/go$GOVERSION.$GOOS-$GOARCH.tar.gz && \
	tar -xvf go$GOVERSION.$GOOS-$GOARCH.tar.gz && \
	rm -rf go$GOVERSION.$GOOS-$GOARCH.tar.gz

RUN mkdir -p "$GOPATH"

RUN mkdir -p "$GOPATH/src" "$GOPATH/pkg" "$GOPATH/bin"

WORKDIR $GOPATH

